package com.jam.cloud.user.api;

import com.jam.cloud.user.pojo.User;
import com.jam.cloud.user.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(value = "/user")
public class UserController {

    @Autowired
    UserService userService;

    @GetMapping(value = "/{id}")
    public User getUserById(@PathVariable Long id){
        User user =userService.queryById(id);
        return  user;
    }


}
